Initialize the allocation to avoid compiler warnings
authorJohan Dahlin <jdahlin@async.com.br>
Fri, 20 Jun 2008 14:28:09 +0000 (14:28 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Fri, 20 Jun 2008 14:28:09 +0000 (14:28 +0000)
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c (gtk_widget_get_allocation): Initialize the
    allocation to avoid compiler warnings

svn path=/trunk/; revision=20647

ChangeLog
gtk/gtkwidget.c

index c9835c85afa5910ea7e1df3e74ad72a2eb52ba3c..f24a8e4a22627afcd5010c2d1f03d0ab6203a7a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,9 +4,8 @@
 
        * gtk/gtk.symbols: Add all newly added accessors so abicheck.sh passes
 
-       * gtk/gtkwidget.c (gtk_widget_get_allocation): Remove unused variable
-       and check if the widget is a GtkWidget subclass, not the uninitialized
-       allocation.
+       * gtk/gtkwidget.c (gtk_widget_get_allocation): Initialize the
+       allocation to avoid compiler warnings
 
 2008-06-20  Michael Natterer  <mitch@imendio.com>
 
index 1c4c305e4d7fc5fddd427886e716dba28c745b9e..b0312b6fd677a7fd89550ff019e560ba0ff33145 100644 (file)
@@ -9899,7 +9899,8 @@ gtk_widget_get_has_tooltip (GtkWidget *widget)
 GtkAllocation
 gtk_widget_get_allocation (GtkWidget *widget)
 {
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), widget);
+  static GtkAllocation allocation = { 0 };
+  g_return_val_if_fail (GTK_IS_WIDGET (widget), allocation);
 
   return widget->allocation;
 }